<%@ page contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>:: JSP 프로젝트 v1 ::</title>
<link href="css/normalize.css" rel="stylesheet">
<link href="css/rmaqlc31.css" rel="stylesheet">
<style type="text/css">
	
	/*회원가입 폼 정렬*/
	#joinfrm {/* border:1px solid red; */ width:365px;}
	#joinfrm label {width:120px; text-align:right;
					font-weight:bold; display:inline-block;
					padding:0 10px 0 0;}
	#joinfrm div {margin:10px 10px;}
		
</style>
</head>
<body>
	<!--  -->
	<jsp:include page="layout/header.jsp"/>
	<%-- 동적포함 : include 지시문과는 달리 포함된 jsp를 --%>
	<%-- 각각 실행하고 그 결과만 현재문서에 포함함 --%>
	<%-- 즉, join.jsp와 header.jsp, footer.jsp를 --%>
	<%-- 따로 실행하고 그 결과만 하나로 합쳐 출력함 --%>
	<!--  -->
	<div id="contents">
		<h2>::회원가입::</h2>
		<form name="joinfrm" id="joinfrm" class="centerme">
			<div><label for="userid">아이디</label>
			<input type="text" name="userid" id="userid"></div>
			<div><label for="passwd">비밀번호</label>
			<input type="password" name="passwd" id="passwd"></div>
			<div><label for="repasswd">비밀번호확인</label>
			<input type="password" name="repasswd" id="repasswd"></div>
			<div><label for="name">이름</label>
			<input type="text" name="name" id="name"></div>
			<div><label for="email">전자우편</label>
			<input type="text" name="email" id="email"></div>
			
			<div><label></label>
			<button type="button" id="joinokbtn">입력완료</button>
			<button type="reset">다시입력</button>
			</div>
		</form>
	</div>
	<!--  -->
	<jsp:include page="layout/footer.jsp"/>
	<!--  -->
	
	<script type="js/jquery-1.11.1.min.js"></script>
	<script type="js/rmaqlc31.js"></script>
	<script type="text/javascript">
		var joinbtn = document.getElementById("joinokbtn");
		joinbtn.onclick = function(){joinme();};
	</script>
	<script type="text/javascript">
		function joinme(){
			var joinfrm = document.getElementById("joinfrm");
			if(joinfrm.userid.value == "")
				alert('아이디를 입력하세요!');
			else if(joinfrm.passwd.value =="")
				alert('비밀번호를 입력하세요!');
			else if(joinfrm.repasswd.value =="")
				alert('비밀번호확인을 입력하세요!');
			else if(joinfrm.name.value =="")
				alert('이름을 입력하세요!');
			else if(joinfrm.email.value =="")
				alert('우편번호를 입력하세요!');
			else{
			joinfrm.method = "post";
			joinfrm.action = "joinok.jsp";
			joinfrm.submit();
			}
		}
	</script>
	
</body>
</html>